{% extends "news/base_blog.html" %}

{% block content %}

{% for object in latest %}
{% url news-detail object.published_on.year,object.published_on.month,object.published_on.day,object.slug as the_url %}

<div>
    <h2><a href="{{the_url}}" class="panel_link" title="{{ object.summary }}">{{ object.title }}</a></h2>

{% if object.summary %}
    <p>{{ object.summary }} <a href="{{the_url}}" class="panel_link">read more...</a> </p>
{% else %}
    <p>{{ object.body|safe }}</p>
{% endif %}
   {% if object.author.first_name and object.author.last_name %}
   <p>Published by {{object.author.first_name}} {{object.author.last_name}} on {{ object.published_on|date:"F j, Y" }}</p>
   {% else %}
    <p>Published by {{object.author.username}} on {{ object.published_on|date:"F j, Y" }}</p>
   {% endif %}
</div>

{% endfor %}

{% endblock %}
